// 登录相关的接口
import request from '@/utils/request'

// 获取图形验证码
export const getUrlCode = () => {
  return request.get('/captcha/image')
}

// 获取短信验证码
export const getMsgCode = (captchaCode, captchaKey, mobile) => {
  return request.post('/captcha/sendSmsCaptcha', {
    form: {
      captchaCode,
      captchaKey,
      mobile

    }
  })
}

// 登录接口
export const login = (mobile, smsCode) => {
  return request.post('/passport/login', {
    form: {
      isParty: false, // 是否是三方登录
      mobile,
      partyData: {}, // 三方登陆信息
      smsCode // 短信验证码
    }
  })
}
